package com.malie.myspringboot.common;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("user_plus")//@TableName中的值对应着表名
public class UserPlusEntity implements Serializable {
    private static final long serialVersionUID = 2181003830023480233L;


    /**
     * 主键
     *
     * @TableId中可以决定主键的类型,不写会采取默认值,默认值可以在yml中配置 AUTO: 数据库ID自增
     * INPUT: 用户输入ID
     * ID_WORKER: 全局唯一ID，Long类型的主键
     * ID_WORKER_STR: 字符串全局唯一ID
     * UUID: 全局唯一ID，UUID类型的主键
     * NONE: 该类型为未设置主键类型
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;
    private Integer age;
    private String addr;

    //@DateTimeFormat(pattern = "yyyy-MM-dd")
    // @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private String birthday;
    //@TableField(exist = false)
    // private String birthdayString;
    // @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private String birthdayDetail;
}
